ERROR [pg_num_rows(): Argument #1 ($result) must be of type PgSql\Result, false given]